$(function() {
	var path = "";
	$.ajax({
		"url" : path + "student/index",
		"type" : "get",
		"data" : "",
		"dataType" : "json",
		"success" : function(data) {
			for ( var i = 0; i < data.length; i++) {
				$tr = $("<tr><th>" + data[i].id + 
						"</th><th>" + data[i].name
						+ "</th><th>" + data[i].gender
						+ "</th><th>" + data[i].age 
						+ "</th><th>" + data[i].telephone 
						+ "</th><th>" + data[i].email 
						+ "</th><th>" + data[i].className + "</th></tr>");
				$("#studentList").append($tr);
			}
		}
	});

	$("#studentList tr:even").css("background", "gray");
})